/**   
 * @Title: BankCardBindingAct.java 
 * @Package com.esun.rabbit2.viewer.mainact.mylotteryact.banckbind 
 * @Description: 绑定银行卡界面 （包括已绑定和未绑定两种情况）
 * @author Miko baoz@500wan.com   
 * @date 2011-7-2 下午05:44:35  
 * copy right 深圳市易讯天空网络技术有限公司
 */
package com.esun.cheetah.view.personal;

import com.esun.cheetah.R;
import com.esun.cheetah.biz.personal.personalinfo.RechargeUserInfo;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;

import android.view.View.OnClickListener;
import android.widget.Button;

import android.widget.TextView;

/**
 * 
 * @Package com.esun.cheetah.view.personal.BankCardBindingAct
 * @ClassName: BankCardBindingAct
 * @Description: TODO(bind band card activity)
 * @author handy <br/>
 * @date create at 2012-7-31 下午3:00:25
 *
 */
public class BankCardBindingAct extends Activity implements OnClickListener {

	private Button btnGoBack;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
//		requestWindowFeature(Window.FEATURE_NO_TITLE);       
//	    getWindow().setFlags(WindowManager.LayoutParams. FLAG_FULLSCREEN ,  
//	                   WindowManager.LayoutParams. FLAG_FULLSCREEN);
		setContentView(R.layout.bank_card_binding_act);

		init();

	}

	private void init() {

		StringBuilder strShowNum = new StringBuilder();
		String[] strCardNum = RechargeUserInfo.getUserInfo().getCardNum()
				.split("|");
		for (int i = 0; i < strCardNum.length; i++) {
			if (i > 4 && i < strCardNum.length - 4) {
				strShowNum.append("*");
			} else {
				strShowNum.append(strCardNum[i]);
			}
		}

		((TextView) this.findViewById(R.id.bank_card_binding_act_tv_bankName))
				.setText(RechargeUserInfo.getUserInfo().getBankName());
		((TextView) this.findViewById(R.id.bank_card_binding_act_tv_bankNum))
				.setText(strShowNum.toString());

		btnGoBack = (Button) this
				.findViewById(R.id.bank_card_binding_act_btn_goBack);
		btnGoBack.setOnClickListener(this);
	}

	@Override
	public void onClick(View v) {

		this.finish();

	}

	@Override
	protected void onPause() {
		// TODO Auto-generated method stub
		super.onPause();
		// this.unregisterReceiver(ConnectionChangeReceiver.getConnectionChangeReceiver());
	}

	@Override
	protected void onResume() {
		// TODO Auto-generated method stub
		super.onResume();
		// this.registerReceiver(ConnectionChangeReceiver.getConnectionChangeReceiver(),
		// ConnectionChangeReceiver.getIntentFilter());
	}
}
